//index.js
//获取应用实例

Page({
  data: {
    sessionid: ''
  },

  onLoad: function (e) {
    
  },
  userInfoHandler: function (e) {
    var that = this;
    that.data.intval = setInterval(function(){
      wx.getSetting({
        success: (res) => {
          if (res.authSetting["scope.userInfo"]==true) {////如果用户重新同意了授权登录
            clearInterval(that.data.intval),wx.reLaunch({
              url: '../home/home',
            }) 
          }
        },
      })
    },1000)    
  },
  onUnLoad:function(){
    clearInterval(that.data.intval);
  }
})
